<!DOCTYPE html>
<html lang="en">
<head>
    <meta name="description" content="后台管理">
    <!-- Twitter meta-->
    <title>添加父板块</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- Main CSS-->
    <link rel="stylesheet" type="text/css" href="../../public/admin/css/main.css">
    <!-- Font-icon css-->
    <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
    <style>
        body{overflow-x:hidden; background:#f2f0f5; padding:15px 0px 10px 5px;}
        #searchmain{ font-size:12px;}
        #search{ font-size:12px; background:#548fc9; margin:10px 10px 0 0; display:inline; width:100%; color:#FFF}
        #search form span{height:40px; line-height:40px; padding:0 0px 0 10px; float:left;}
        #search form input.text-word{height:24px; line-height:24px; width:180px; margin:8px 0 6px 0; padding:0 0px 0 10px; float:left; border:1px solid #FFF;}


        #search a:hover.add{ text-decoration:underline; color:#d2e9ff;}
        #main-tab{ border:1px solid #eaeaea; background:#FFF; font-size:12px;}

        #main-tab td{ font-size:12px; line-height:40px;}
        #main-tab td a{ font-size:12px; color:#548fc9;}
        #main-tab td a:hover{color:#565656; text-decoration:underline;}
        .bordertop{ border-top:1px solid #ebebeb}
        .borderright{ border-right:1px solid #ebebeb}
        .borderbottom{ border-bottom:1px solid #ebebeb}
        .borderleft{ border-left:1px solid #ebebeb}
        .gray{ color:#dbdbdb;}
        td.fenye{ padding:10px 0 0 0; text-align:right;}
        .bggray{ background:#f9f9f9; font-size:14px; font-weight:bold; padding:10px 10px 10px 0; width:120px;}
        .main-for{ padding:10px;}
        .main-for input.text-word{ width:310px; height:36px; line-height:36px; border:#ebebeb 1px solid; background:#FFF; font-family:"Microsoft YaHei","Tahoma","Arial",'宋体'; padding:0 10px;}
        .main-for select{ width:310px; height:36px; line-height:36px; border:#ebebeb 1px solid; background:#FFF; font-family:"Microsoft YaHei","Tahoma","Arial",'宋体'; color:#666;}
        .main-for input.text-but{ width:100px; height:40px; line-height:30px; border: 1px solid #cdcdcd; background:#e6e6e6; font-family:"Microsoft YaHei","Tahoma","Arial",'宋体'; color:#969696; float:left; margin:0 10px 0 0; display:inline; cursor:pointer; font-size:14px; font-weight:bold;}

    </style>
</head>
<body class="app sidebar-mini rtl">
<?php if(!empty($_COOKIE['uname']) && !empty($_COOKIE['auth'])) { ?>
    <?php require 'menu.php'?>
    <!-- Sidebar menu-->
    <main class="app-content">
        <div class="app-title">
            <div>
                <h1><i class="fa fa-dashboard"></i> 首页</h1>
            </div>
            <ul class="app-breadcrumb breadcrumb">
                <li class="breadcrumb-item"><i class="fa fa-home fa-lg"></i></li>
                <li class="breadcrumb-item"><a href="../admin.php">首页</a></li>
            </ul>
        </div>
        <table id="searchmain" width="99%" cellspacing="0" cellpadding="0" border="0">
            <tbody>
            <tr>
                <td id="addinfo" valign="top" align="left">
                    <a href="father_add.php" target="mainFrame" onfocus="this.blur()" class="add">添加父板块</a>
                </td>
            </tr>
            <tr>
                <td valign="top" align="left">
                    <form method="post" action="contro_plate.php?a=add" enctype="multipart/form-data">
                        <table id="main-tab" width="100%" cellspacing="0" cellpadding="0" border="0">
                            <tbody>
                          <tr onmouseout="this.style.backgroundColor='#ffffff'" onmouseover="this.style.backgroundColor='#edf5ff'" style="background-color: rgb(255, 255, 255);">
                                 <td class="borderright borderbottom bggray" valign="middle" align="right">父板块名：</td>
                                 <td class="borderright borderbottom main-for" valign="middle" align="left">
                                     <input type="text" name="uname" value="" class="text-word">
                                 </td>
                             </tr>
                            <tr onmouseout="this.style.backgroundColor='#ffffff'" onmouseover="this.style.backgroundColor='#edf5ff'" style="background-color: rgb(255, 255, 255);">
                                <td class="borderright borderbottom bggray" valign="middle" align="right">logo：</td>
                                <td class="borderright borderbottom main-for" valign="middle" align="left">
                                    <div id="avatardesigner" style=" text-align: center">
                                        <img id="portrait" src="" style="display:none;" />
                                    </div>
                                    <input type="file" name="ufile" onchange="showPreview(this)"/>
                                    <script type="text/javascript">
                                        function showPreview(source) {
                                            var file = source.files[0];
                                            if (window.FileReader) {
                                                var fr = new FileReader();
                                                console.log(fr);
                                                var portrait = document.getElementById('portrait');
                                                fr.onloadend = function (e) {
                                                    portrait.src = e.target.result;
                                                };
                                                fr.readAsDataURL(file);
                                                portrait.style.display = 'block';
                                            }
                                        }
                                    </script>
                                </td>
                            </tr>
                            <tr onmouseout="this.style.backgroundColor='#ffffff'" onmouseover="this.style.backgroundColor='#edf5ff'" style="background-color: rgb(255, 255, 255);">
                                <td class="borderright borderbottom bggray" valign="middle" align="right">&nbsp;</td>
                                <td class="borderright borderbottom main-for" valign="middle" align="left">
                                    <input name="" type="submit" value="提交" class="text-but">
                                    <input name="" type="button"  onclick="javascript:history.back(-1);" value="返回" class="text-but"></td>
                            </tr>
                            </tbody></table>
                    </form>
                </td>
            </tr>
            </tbody></table>

    </main>

    <script src="../../public/admin/js/jquery-3.2.1.min.js"></script>
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <script type="text/javascript" src="https://cdn.bootcss.com/Swiper/3.4.2/js/swiper.jquery.min.js"></script>
    <script src="../../public/admin/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="../../public/admin/js/xadmin.js"></script>
    <script src="../../public/admin/js/popper.min.js"></script>
    <script src="../../public/admin/js/bootstrap.min.js"></script>
    <script src="../../public/admin/js/main.js"></script>
    <script src="../../public/admin/js/plugins/pace.min.js"></script>
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <script type="text/javascript" src="https://cdn.bootcss.com/Swiper/3.4.2/js/swiper.jquery.min.js"></script>
    <script src="../../public/admin/js/lib/layui/layui.js" charset="utf-8"></script>
    <?php
}else{
    echo "<script>alert('你还没登录');window.location.href='../index.php';</script>";die;
}
?>
</body>
</html>

